// src/api/regulator/region.js
import request from '@/utils/request'

// 获取地区信息列表
export function list(query) {
  return request({
    url: '/nongjt/region/list',
    method: 'get',
    params: query
  })
}

// 获取监管单位列表
export function getRegulatorUnits(query) {
  return request({
    url: '/nongjt/organization/all',  // 修改此处URL
    method: 'get',
    params: query
  })
}

// 新增监管单位
export function addRegulatorUnit(data) {
  return request({
    url: '/nongjt/organization/add',
    method: 'post',
    data: data
  })
}

// 修改监管单位
export function updateRegulatorUnit(data) {
  return request({
    url: '/nongjt/organization/update',
    method: 'post',
    data: data
  })
}

// 删除监管单位
export function deleteRegulatorUnit(id) {
  return request({
    url: `/nongjt/organization/delete/${id}`,
    method: 'post'
  })
}
